<?php
header("Content-type: text/html; charset=utf-8");
if (!defined('DS')) {
    define('DS', DIRECTORY_SEPARATOR);
}

define('ROOT',dirname(dirname(__FILE__)));
define('ADMIN_PATH',dirname(__FILE__));
define('ADMIN_MODULE',ADMIN_PATH.DS.'module');
define('TEMPLATE',ADMIN_PATH.DS.'template'.DS);
define('PRODUCT_IMAGES',ADMIN_PATH.DS.'product_images'.DS);
define('SHOP_IMAGES',ADMIN_PATH.DS.'shop_photos'.DS);

include_once ROOT.DS.'include'.DS.'init.php';

$module = isset($_GET['mod']) ? strtolower(htmlentities($_GET['mod'],ENT_QUOTES)) : 'user';
$action = isset($_GET['act']) ? strtolower(htmlentities($_GET['act'],ENT_QUOTES)) : 'login';

define('MODULE', $module);
define('ACTION', $action);

if(file_exists(ADMIN_MODULE.DS.MODULE.DS.ACTION.'.php')){
	include ADMIN_MODULE.DS.MODULE.DS.ACTION.'.php';
}else{
	echo '你访问的模块不存在！请返回首页';
	exit;
}

?>